-
Notifications
You must be signed in to change notification settings - Fork 936
NH-3609 - Fix using Projections.Conditional inside of Projections.Count #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
|
||
public virtual SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary<string, IFilter> enabledFilters) | ||
{ | ||
return SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria, 0, criteriaQuery, enabledFilters)); | ||
var thinger = SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria, 0, criteriaQuery, enabledFilters)); | ||
return thinger; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert changes to this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, I'm kinda new to git, is there a way for me to edit the
history, or should I do some rollback and re apply my changes to a new
commit?
On Apr 2, 2014 6:26 PM, "Alexander I. Zaytsev" [email protected]
wrote:
In src/NHibernate/Criterion/GroupedProjection.cs:
} public virtual SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary<string, IFilter> enabledFilters) {
return SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria, 0, criteriaQuery, enabledFilters));
var thinger = SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria, 0, criteriaQuery, enabledFilters));
return thinger; }
Can you please revert changes to this file?
Reply to this email directly or view it on GitHubhttps://github.com//pull/261/files#r11231364
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use GitHub for Windows.
Should make this very easy as it's an User Interface.
https://windows.github.com/ https://windows.github.com/
2014-04-03 0:45 GMT+02:00 braahyan [email protected]:
In src/NHibernate/Criterion/GroupedProjection.cs:
} public virtual SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary<string, IFilter> enabledFilters) {
return SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria, 0, criteriaQuery, enabledFilters));
var thinger = SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria, 0, criteriaQuery, enabledFilters));
return thinger; }
Sure thing, I'm kinda new to git, is there a way for me to edit the
history, or should I do some rollback and re apply my changes to a new
commit?
... <#145249e95339a3c7_>
On Apr 2, 2014 6:26 PM, "Alexander I. Zaytsev" [email protected]
wrote: In src/NHibernate/Criterion/GroupedProjection.cs: > } > > public
virtual SqlString ToGroupSqlString(ICriteria criteria, ICriteriaQuery
criteriaQuery, IDictionary<string, IFilter> enabledFilters) > { > - return
SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria,
0, criteriaQuery, enabledFilters)); > + var thinger =
SqlStringHelper.RemoveAsAliasesFromSql(this.projection.ToSqlString(criteria,
0, criteriaQuery, enabledFilters)); > + return thinger; > } Can you please
revert changes to this file? -- Reply to this email directly or view it on
GitHub<
https://github.com/nhibernate/nhibernate-core/pull/261/files#r11231364> .Reply to this email directly or view it on GitHubhttps://github.com//pull/261/files#r11232017
.
I have just pushed up a changeset to revert that file to the previous version. Let me know if I did the right thing. There's also a changeset around allowing parameters to be used in a GroupedProjection, should I start a new issue in JIRA and then put the test I wrote in a folder corresponding to that issue, or is there a better way for me to do that, or is how it is right now ok? |
What's the status on this? |
Is there something else that I need to do to get this code into NHibernate? |
Projections.Constant("", NHibernateUtil.String), | ||
Projections.Constant(null, NHibernateUtil.String))).WithAlias(() => mappingEntity.Count)) | ||
) | ||
.TransformUsing(Transformers.AliasToBean<MappingEntity>()).List<MappingEntity>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check something here?
what's the issue? |
Hey guys,
Found this issue last week, managed to fix it with a fairly straightforward change. It affects back to at least 3.3.2.4000 . Let me know if I need to enhance the test case, but I think it illustrates the issue fairly clearly.